<html><head><title>Using the SHELL compiler</title></head>
<body bgcolor="#FFFFDF" link="#009999" vlink="#006666" alink="#006666">
<font face="Arial" size="2"><p align="center"><b><font size="5">Using the SHELL compiler</font></b></p>


<p><b>Introduction</b></p><blockquote>


The shell compiler is located in the subdirectory 'Compilers\' from the PureBasic drawer. 
The easier way to access this is to add this directory in the windows PATH variable, 
which will give access to all the commands of this directory at all times. 

</blockquote>
<p><b>Command switchs</b></p><blockquote>


/? : display a quick help about the compiler. <br>
<br>
/COMMENTED : create a commented '.asm' output file when creating an executable. 
This file can be re-assembled later when the needed modifications have been made. 
This option is for advanced programmers only. <br>
<br>
/DEBUGGER : enable the debugger support. <br>
<br>
/EXE "Filename" : create a standalone Executable or DLL specified by the filename at the desired path location. <br>
<br>
/ICON "IconName" : add the specified icon to the executable. <br>
<br>
/INLINEASM : enable the <a href=../reference/inlinedasm.html>inline asm</a> feature (asm routines can be written directly in the BASIC source code). <br>
<br>
/RESIDENT "Filename" : create a resident file specified by the filename. <br>
<br>
/CONSOLE: output file in <a href="../console/index.html">Console</a> format. Default format is Win32. <br>
<br>
/DLL: output file is a <a href=../reference/dll.html>DLL</a>. <br>
<br>
/NT4: Enable the NT4 compliance for multimedia functions (Sprite, Keyboard, Mouse). <br>
<br>
/XP: Add the Windows XP theme support to the executable. <br>
<br>
/REASM: Reassemble the PureBasic.asm file into an executable. This allow to use the /COMMENTED function, 
modify the asm output and creates the executable again. <br>
<br>
/LINENUMBERING: Add lines and files information to the executable, which can slow it considerably. 
This is designed especially for third debug programs like the <a href="../onerror/index.html">OnError library</a>. <br>
<br>
/QUIET: Disable all unnecessary text output, very useful when using another editor. <br>
<br>
/STANDBY: Loads the compiler in memory and wait for external commands (editor, scripts...). <br>
<br>
/MMX, /3DNOW, /SSE or /SSE2: Creates a processor specific executable. This means than if a 
processor specific routine is available it will be used for this executable. 
Therefore, the executable will run correctly only on computer with this kind of CPU. <br>
<br>
/DYNAMICCPU: Creates a executable containing all the available processor specific routines. 
When the program is started, it looks for the processor type and then select the more 
appropriates routines to use. This makes a bigger executable, but result in the 
fastest possible program.<br>
<br>
/RESOURCE "Filename": Add a Windows resource file (.rc) to the created executable or DLL. This 
should be not a compiled resource file, but an ascii file with the directives in it. It's possible 
to specify only one resource, but this file can include other resource script if needed. <br>
<br>
/LINKER "ResponseFile": Specify a file which contains commands to be passed directly to the linker. 
On Windows, PureBasic use the PellesC linker (polink), more informations about the possible 
options can be found in the related documentation. <br>
<br>
/IGNORERESIDENT "Filename": Doesn't load the specified resident file when the compiler starts. It's 
mostly useful when updating a resident which already exists, so it won't load it. <br>
<br>
/CONSTANT Name=Value: Creates the specified constant with the given expression. 
Example: 'pbcompiler test.pb /CONSTANT MyConstant=10'. The constant <font color="#924B72">#MyConstant</font> 
will be created on the fly with a value of 10 before the program gets compiled. 

<p><b>Example:</b> </p>


<pre><font face="Courier New, Courier, mono"size="2">  shell&#062; pbcompiler sourcecode.pb
</font></pre>

The compiler will compile the source code and execute it. <br>
<br>

<pre><font face="Courier New, Courier, mono"size="2">  shell&#062; pbcompiler sourcecode.pb /DEBUGGER /INLINEASM
</font></pre>

The compiler will compile the source code and execute it with debugger and inline asm support. 



</body></html>